package com.event.management.backend.dto;

import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.util.Date;

/**
 * 创建用户的参数DTO
 */
@Data
@ApiModel(description = "创建用户参数")
public class UserCreateDTO {
    
    @ApiModelProperty(value = "用户ID", example = "1")
    private Integer id;
    
    @NotBlank(message = "用户名不能为空")
    @ApiModelProperty(value = "用户名", required = true, example = "zhangsan")
    private String username;
    
    @NotBlank(message = "密码不能为空")
    @ApiModelProperty(value = "密码", required = true, example = "123456")
    private String password;
    
    @ApiModelProperty(value = "真实姓名", example = "张三")
    private String realName;
    
    @ApiModelProperty(value = "性别", example = "male", allowableValues = "male,female,secret")
    private String gender;
    
    @ApiModelProperty(value = "邮箱", example = "zhangsan@example.com")
    private String email;
    
    @ApiModelProperty(value = "手机号", example = "13800138000")
    private String phone;
    
    @ApiModelProperty(value = "兴趣爱好", example = "阅读,旅游,编程")
    private String interests;
    
    @ApiModelProperty(value = "生日", example = "1990-01-01")
    private Date birthday;
    
    @ApiModelProperty(value = "个人简介", example = "热爱技术，专注编程")
    private String bio;
    
    @ApiModelProperty(value = "头像URL", example = "https://example.com/avatar.jpg")
    private String avatar;
    
    @ApiModelProperty(value = "地址", example = "北京市海淀区")
    private String address;
    
    @ApiModelProperty(value = "职业", example = "软件工程师")
    private String profession;
    
    @NotBlank(message = "角色不能为空")
    @Pattern(regexp = "^(admin|organizer|user)$", message = "角色只能是admin、organizer或user")
    @ApiModelProperty(value = "用户角色", required = true, example = "user", allowableValues = "admin,organizer,user")
    private String role;
} 